feat(components): add pgvector indexer and retriever with pgvector-go#672
Open
ricciii0 wants to merge 4 commits intocloudwego:mainfrom
Open
feat(components): add pgvector indexer and retriever with pgvector-go#672ricciii0 wants to merge 4 commits intocloudwego:mainfrom
ricciii0 wants to merge 4 commits intocloudwego:mainfrom
Conversation
Add pgvector support for Eino framework with type-safe vector operations, SQL injection protection, and comprehensive testing. - Indexer: batch processing, UPSERT, connection pooling - Retriever: multiple distance functions, score threshold, WHERE filtering - Security: identifier validation, quoted identifiers - Testing: 22 tests covering security and functionality - Docs: complete README and examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add complete pgvector indexer and retriever implementations for Eino framework with production-ready features including SQL injection protection, type-safe vector operations, and comprehensive testing.
Changes
📦 New Components
components/indexer/pgvector: Store documents with vector embeddingscomponents/retriever/pgvector: Retrieve documents by vector similarity✨ Features
Indexer
pgvector-gopgxpool.Pool)Retriever
🔒 Security
🧪 Testing
📚 Documentation
📦 Dependencies
github.com/cloudwego/einov0.6.0github.com/jackc/pgx/v5v5.7.2github.com/pgvector/pgvector-gov0.3.0github.com/stretchr/testifyv1.10.0Test Plan
Example Usage
Indexer